package com.ff.javamonkey.sqlite.type;

import com.ff.javamonkey.util.ParcelUtils;

import android.os.Parcel;
import android.os.Parcelable;

public class Acrlac implements JavaMonkeyType, Parcelable {
	// Debugging
	private final String TAG = "Acrlac";
	// Fields
	private String mId;
	private String mType;
	private String mDataFileId;
	private String mFilename;
	private String mDataType;
	private String mTargetPath;
	private String mTargetCsci;
	private String mEffectiveTime;
	private String mAircraft;
	private String mFileStatus;
	private String mFileHash;
	// Helper fields
	private int fileSize;
	private int currentFileSize;
	private boolean isDownloading = false;
	private boolean isCheckingHashFile = false;
	private boolean isAvailable = false;
	private int progress;

	public Acrlac() {
	}
	
	public Acrlac(Parcel in) {
		mId = ParcelUtils.readStringFromParcel(in);
		mAircraft = ParcelUtils.readStringFromParcel(in);
		mDataFileId = ParcelUtils.readStringFromParcel(in);
		mDataType = ParcelUtils.readStringFromParcel(in);
		mEffectiveTime = ParcelUtils.readStringFromParcel(in);
		mFileHash = ParcelUtils.readStringFromParcel(in);
		mFilename = ParcelUtils.readStringFromParcel(in);
		mFileStatus = ParcelUtils.readStringFromParcel(in);
		mTargetCsci = ParcelUtils.readStringFromParcel(in);
		mTargetPath = ParcelUtils.readStringFromParcel(in);
		mType = ParcelUtils.readStringFromParcel(in);
	}

	public String getmId() {
		return mId;
	}

	public void setmId(String mId) {
		this.mId = mId;
	}

	public String getmType() {
		return mType;
	}

	public void setmType(String mType) {
		this.mType = mType;
	}

	public String getmDataFileId() {
		return mDataFileId;
	}

	public void setmDataFileId(String mDataFileId) {
		this.mDataFileId = mDataFileId;
	}

	public String getmFilename() {
		return mFilename;
	}

	public void setmFilename(String mFilename) {
		this.mFilename = mFilename;
	}

	public String getmDataType() {
		return mDataType;
	}

	public void setmDataType(String mDataType) {
		this.mDataType = mDataType;
	}

	public String getmTargetPath() {
		return mTargetPath;
	}

	public void setmTargetPath(String mTargetPath) {
		this.mTargetPath = mTargetPath;
	}

	public String getmTargetCsci() {
		return mTargetCsci;
	}

	public void setmTargetCsci(String mTargetCsci) {
		this.mTargetCsci = mTargetCsci;
	}

	public String getmEffectiveTime() {
		return mEffectiveTime;
	}

	public void setmEffectiveTime(String mEffectiveTime) {
		this.mEffectiveTime = mEffectiveTime;
	}

	public String getmAircraft() {
		return mAircraft;
	}

	public void setmAircraft(String mAircraft) {
		this.mAircraft = mAircraft;
	}

	public String getmFileStatus() {
		return mFileStatus;
	}

	public void setmFileStatus(String mFileStatus) {
		this.mFileStatus = mFileStatus;
	}

	public String getmFileHash() {
		return mFileHash;
	}

	public void setmFileHash(String mFileHash) {
		this.mFileHash = mFileHash;
	}
	
	// This is a helper getter/setter
	public void setFileSize(int fileSize) {
		this.fileSize = fileSize;
	}
	
	public int getFileSize() {
		return fileSize;
	}
	
	public void setCurrentFileSize(int current) {
		this.currentFileSize = current;
	}
	
	public int getCurrentFileSize() {
		return currentFileSize;
	}
	
	public void setDownloading(boolean downloading) {
		this.isDownloading = downloading;
	}
	
	public boolean isDownloading() {
		return isDownloading;
	}
	
	public void setProgress(int progress) {
		this.progress = progress;
	}
	
	public int getProgress() {
		return progress;
	}
	
	public void setCheckingHashFile(boolean checking) {
		this.isCheckingHashFile = checking;
	}
	
	public boolean isCheckingHashFile() {
		return isCheckingHashFile;
	}
	
	public void setAvailable(boolean available) {
		this.isAvailable = available;
	}
	
	public boolean isAvailable() {
		return isAvailable;
	}

	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void writeToParcel(Parcel arg0, int arg1) {
		ParcelUtils.writeStringToParcel(arg0, mId);
		ParcelUtils.writeStringToParcel(arg0, mAircraft);
		ParcelUtils.writeStringToParcel(arg0, mDataFileId);
		ParcelUtils.writeStringToParcel(arg0, mDataType);
		ParcelUtils.writeStringToParcel(arg0, mEffectiveTime);
		ParcelUtils.writeStringToParcel(arg0, mFileHash);
		ParcelUtils.writeStringToParcel(arg0, mFilename);
		ParcelUtils.writeStringToParcel(arg0, mFileStatus);
		ParcelUtils.writeStringToParcel(arg0, mTargetCsci);
		ParcelUtils.writeStringToParcel(arg0, mTargetPath);
		ParcelUtils.writeStringToParcel(arg0, mType);
	}
	
	public static final Parcelable.Creator<Acrlac> CREATOR
		= new Parcelable.Creator<Acrlac>() {
		public Acrlac createFromParcel(Parcel in) {
			return new Acrlac(in);
		}
		
		public Acrlac[] newArray(int size) {
			return new Acrlac[size];
		}
	};
}
